﻿using SoftHelper.Tool;
using SoftHelper.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SoftHelper.ViewModel
{
    public class MainUserControlViewModel
    {
        public MainUserControlViewModel()
        {

        }
        /// <summary>
        /// 开始
        /// </summary>
        public RalyCommand Start
        {
            get
            {
                return new RalyCommand((o) =>
                {
                    ChoseSoftDir choseSoftDir = new ChoseSoftDir();
                    MainViewModel.ChangeFragment(1);
                 
                }, x => true);
            }
        }

        public RalyCommand Up
        {
            get
            {
                return new RalyCommand((o) =>
                {
                    MainViewModel.ChangeFragment(-1);
                });
            }
        }

        public RalyCommand ShowAnalysisProject
        {
            get
            {
                return new RalyCommand(o =>
                {
                    System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
                    folderBrowserDialog.ShowDialog();
                    String path = folderBrowserDialog.SelectedPath;
                    AnalysisProject analysisProject = new AnalysisProject(path);
                    analysisProject.Show();
                },x=>true);
            }
        }
    }
}
